package com.vdongchina.miniapp.commons;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;

/**
 * Copyright (C)
 * FileName: RedisOps
 * Author:   maokai
 * Date:     2021/8/13 15:30
 * Description:该接口不承诺稳定, 外部实现请继承BaseWxRedisOps
 */
public interface RedisOps {
    default String contact(String... args) {
        return String.join(":", args);
    }
    String getValue(String key);

    void setValue(String key, String value, int expire, TimeUnit timeUnit);

    Long getExpire(String key);

    void expire(String key, int expire, TimeUnit timeUnit);

    Lock getLock(String key);
}
